{namespace codepage}

/**
 * This is a Closure Template.
 *
 * To regenerate just en.js, run this command:
 * java -jar ../_soy/SoyToJsSrcCompiler.jar --outputPathFormat generated/en.js --srcs ../common.soy,template.soy
 *
 * To regenerate all files, see: trunk/apps/common.soy
 */

/**
 * Translated messages for use in JavaScript.
 */
{template .messages}
  {call apps.messages /}
  <div style="display: none">
    <span id="Code_badXml">{msg meaning="Code.badXml" desc="alert - Message shown when the user tries switching from the XML tab after entering XML text that could not be parsed.  This asks whether they wish to abandon the XML they added.  If they select 'OK' (or the translated equivalent), the XML is cleared, and the other tab is shown.  If they select 'Cancel', they remain on the XML tab with the bad XML.\n\nUsed in JavaScript \u003Ccode\u003Ewindow.confirm()\u003C/code\u003E."}Error parsing XML:\n%1\n\nSelect 'OK' to abandon your changes or 'Cancel' to further edit the XML.{/msg}</span>
    <span id="Code_badCode">{msg meaning="Code.badCode" desc="alert - Message shown if an error occurs while interpreting the user program.  The error description follows."}Program error:\n%1{/msg}</span>
    <span id="Code_timeout">{msg meaning="Code.timeout" desc="alert - Message shown if the program has run for more than the permitted number of steps.  This exists so that programs with infinite loops do not run forever."}Maximum execution iterations exceeded.{/msg}</span>
    <span id="Code_discard">{msg meaning="Code.discard" desc="alert - Message shown after the user clicks on the 'discard all' icon.  Selecting 'OK' (or the translated equivalent) causes all of the blocks to be discarded.  Selecting 'Cancel' prevents blocks from being deleted.\n\nParameters:\n* %1 - number of blocks to be deleted. It is always an integer greater than or equal to 2."}Delete all %1 blocks?{/msg}</span>

    // ComputerCraft
    <span id="Code_turtleForward">{msg meaning="Code.turtleForward" desc="TODO"}move forward{/msg}</span>
    <span id="Code_turtleBackward">{msg meaning="Code.turtleBackward" desc="TODO"}move backward{/msg}</span>
    <span id="Code_turtleUp">{msg meaning="Code.turtleUp" desc="TODO"}move up{/msg}</span>
    <span id="Code_turtleDown">{msg meaning="Code.turtleDown" desc="TODO"}move down{/msg}</span>
    <span id="Code_turtleMoveTooltip">{msg meaning="Code.turtleMoveTooltip" desc="TODO"}
    Try to move the turtle in the specified direction, returning true if successful, false if the way is blocked.{/msg}</span>
    <span id="Code_turtleRight">{msg meaning="Code.turtleRight" desc="TODO"}turn right{/msg}</span>
    <span id="Code_turtleLeft">{msg meaning="Code.turtleLeft" desc="TODO"}turn left{/msg}</span>
    <span id="Code_turtleTurnTooltip">{msg meaning="Code.turtleTurnTooltip" desc="TODO"}
    Turn 90 degrees in the specified direction.{/msg}</span>

    <span id="Code_turtleDigUp">{msg meaning="Code.turtleDigUp" desc="TODO"}dig up{/msg}</span>
    <span id="Code_turtleDigDown">{msg meaning="Code.turtleDigDown" desc="TODO"}dig down{/msg}</span>
    <span id="Code_turtleDigFront">{msg meaning="Code.turtleDigFront" desc="TODO"}dig in front{/msg}</span>
    <span id="Code_turtleDigTooltip">{msg meaning="Code.turtleDigTooltip" desc="TODO"}
    Try to dig in the specified direction, returning true if successful, false otherwise (for example, if the block is empty or bedrock is encountered).{/msg}</span>

    <span id="Code_turtleDetectUp">{msg meaning="Code.turtleDetectUp" desc="TODO"}detect above{/msg}</span>
    <span id="Code_turtleDetectDown">{msg meaning="Code.turtleDetectDown" desc="TODO"}detect below{/msg}</span>
    <span id="Code_turtleDetectFront">{msg meaning="Code.turtleDetectFront" desc="TODO"}detect in front{/msg}</span>
    <span id="Code_turtleDetectTooltip">{msg meaning="Code.turtleDetectTooltip" desc="TODO"}
    Detect whether there is a block in the specified direction.  Mobs, liquids, and floating objects are not detected.  The result is true if a block was detected, false otherwise.{/msg}</span>
    <span id="Code_turtlePlaceUp">{msg meaning="Code.turtlePlaceUp" desc="TODO"}place item above{/msg}</span>
    <span id="Code_turtlePlaceDown">{msg meaning="Code.turtlePlaceDown" desc="TODO"}place item below{/msg}</span>
    <span id="Code_turtlePlaceFront">{msg meaning="Code.turtlePlaceFront" desc="TODO"}place item in front{/msg}</span>
    <span id="Code_turtlePlaceTooltip">{msg meaning="Code.turtlePlaceTooltip" desc="TODO"}
    Place an item from the selected slot in the specified direction.  The result is true if successful, false if no item was in the slot or it could not be placed.{/msg}</span>
    <span id="Code_turtlePlaceSignUp">{msg meaning="Code.turtlePlaceSignUp" desc="TODO"}place item above{/msg}</span>
    <span id="Code_turtlePlaceSignDown">{msg meaning="Code.turtlePlaceSignDown" desc="TODO"}place item below{/msg}</span>
    <span id="Code_turtlePlaceSignFront">{msg meaning="Code.turtlePlaceSignFront" desc="TODO"}place item in front{/msg}</span>
    <span id="Code_turtlePlaceSignText">{msg meaning="Code.turtlePlaceSignText" desc="TODO"}with sign text %1{/msg}</span>
    <span id="Code_turtlePlaceSignTooltip">{msg meaning="Code.turtlePlaceSignTooltip" desc="TODO"}
    Place an item from the selected slot in the specified direction.  If it is a sign, it will have the specified text.  The result is true if an item could be placed, false if no item was in the slot or it could not be placed.{/msg}</span>

    <span id="Code_terminate">{msg meaning="Code.terminate" desc="TODO"}end program with message %1{/msg}</span>
    <span id="Code_terminateTooltip">{msg meaning="Code.terminateTooltip" desc="TODO"}End the program with the provided error message.  This should not be used for normal termination.{/msg}</span>
  </div>
{/template}

/**
 * Web page structure.
 */
{template .start}
  {call .messages /}
  <script type="text/javascript" src="../../blockly_compressed.js"></script>
  <script type="text/javascript" src="../../blocks_compressed.js"></script>
  <script type="text/javascript" src="../../lua_compressed.js"></script>
  <script type="text/javascript" src="../../{$ij.langSrc}"></script>
  <script type="text/javascript" src="blocks.js"></script>
  <table width="100%" height="100%">
    <tr>
      <td>
        <h1>
          <span id="title">
            <a href="../index.html">{msg meaning="Apps.blocklyMessage" desc="IBID"}Blockly{/msg}</a>
            {sp}:{sp}
            {msg meaning="Code.title" desc="title - Title of this application, indicating that it is for writing arbitrary programs."}
              Code
            {/msg}
          </span>
        </h1>
      </td>
      <td class="farSide">
        <select id="languageMenu"></select>
      </td>
    </tr>
    <tr>
      <td colspan=2>
        <table width="100%">
          <tr id="tabRow" height="1em">
            <td id="tab_blocks" class="tabon" onclick="Code.tabClick(this.id)">{msg meaning="Code.blocks" desc="tab text - Displays and allows editing of the user's program as blocks."}Blocks{/msg}</td>
            <td class="tabmin">&nbsp;</td>
            <td id="tab_lua" class="taboff" onclick="Code.tabClick(this.id)">Lua</td>
            <td class="tabmin">&nbsp;</td>
            <td id="tab_xml" class="taboff" onclick="Code.tabClick(this.id)">XML</td>
            <td class="tabmax">
              <button id="trashButton" class="notext" title="{msg meaning="Code.trashTooltip" desc="tooltip - Clicking on this causes the user program to be discarded."}Discard all blocks.{/msg}">
                <img src='../../media/1x1.gif' class="trash icon21">
              </button>{sp}
              <button id="linkButton" class="notext" title="{msg meaning="Apps.linkTooltip" desc="IBID."}Save and link to blocks.{/msg}">
                <img src='../../media/1x1.gif' class="link icon21">
              </button>{sp}
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="99%" colspan=2 id="content_area">
        {call .toolbox /}
      </td>
    </tr>
  </table>
  <div id="content_blocks" class="content"></div>
  <pre id="content_lua" class="content"></pre>
  <textarea id="content_xml" class="content" wrap="off"></textarea>
  {call apps.dialog /}
  {call apps.storageDialog /}
{/template}

/**
 * Toolbox.
 */
{template .toolbox}
  <xml id="toolbox" style="display: none">
    <category name="{msg meaning="Code.catComputerCraft" desc="TODO"}ComputerCraft{/msg}">
      <block type="turtle_move"></block>
      <block type="turtle_turn"></block>
      <block type="turtle_dig"></block>
      <block type="turtle_detect"></block>
      <block type="turtle_place"></block>
      <block type="turtle_place_sign"></block>
      <block type="terminate"></block>
    </category>
    <category name="{msg meaning="Apps.catLogic" desc="IBID"}Logic{/msg}">
      <block type="controls_if"></block>
      <block type="logic_compare"></block>
      <block type="logic_operation"></block>
      <block type="logic_negate"></block>
      <block type="logic_boolean"></block>
      <block type="logic_null"></block>
      <block type="logic_ternary"></block>
    </category>
    <category name="{msg meaning="Apps.catLoops" desc="IBID"}Loops{/msg}">
      <block type="controls_repeat_ext">
        <value name="TIMES">
          <block type="math_number">
            <title name="NUM">10</title>
          </block>
        </value>
      </block>
      <block type="controls_whileUntil"></block>
      <block type="controls_for">
        <value name="FROM">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <value name="TO">
          <block type="math_number">
            <title name="NUM">10</title>
          </block>
        </value>
        <value name="BY">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
      </block>
      <block type="controls_forEach"></block>
      <block type="controls_flow_statements"></block>
    </category>
    <category name="{msg meaning="Apps.catMath" desc="IBID"}Math{/msg}">
      <block type="math_number"></block>
      <block type="math_arithmetic"></block>
      <block type="math_single"></block>
      <block type="math_trig"></block>
      <block type="math_constant"></block>
      <block type="math_number_property"></block>
      <block type="math_change">
        <value name="DELTA">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
      </block>
      <block type="math_round"></block>
      <block type="math_on_list"></block>
      <block type="math_modulo"></block>
      <block type="math_constrain">
        <value name="LOW">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <value name="HIGH">
          <block type="math_number">
            <title name="NUM">100</title>
          </block>
        </value>
      </block>
      <block type="math_random_int">
        <value name="FROM">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <value name="TO">
          <block type="math_number">
            <title name="NUM">100</title>
          </block>
        </value>
      </block>
      <block type="math_random_float"></block>
    </category>
    <category name="{msg meaning="Apps.catText" desc="IBID"}Text{/msg}">
      <block type="text"></block>
      <block type="text_join"></block>
      <block type="text_append">
        <value name="TEXT">
          <block type="text"></block>
        </value>
      </block>
      <block type="text_length"></block>
      <block type="text_isEmpty"></block>
      <block type="text_indexOf">
        <value name="VALUE">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.textVariable" desc="IBID"}text{/msg}</title>
          </block>
        </value>
      </block>
      <block type="text_charAt">
        <value name="VALUE">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.textVariable" desc="IBID"}text{/msg}</title>
          </block>
        </value>
      </block>
      <block type="text_getSubstring">
        <value name="STRING">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.textVariable" desc="IBID"}text{/msg}</title>
          </block>
        </value>
      </block>
      <block type="text_changeCase"></block>
      <block type="text_trim"></block>
      <block type="text_print"></block>
      <block type="text_prompt"></block>
    </category>
    <category name="{msg meaning="Apps.catLists" desc="IBID"}Lists{/msg}">
      <block type="lists_create_empty"></block>
      <block type="lists_create_with"></block>
      <block type="lists_repeat">
        <value name="NUM">
          <block type="math_number">
            <title name="NUM">5</title>
          </block>
        </value>
      </block>
      <block type="lists_length"></block>
      <block type="lists_isEmpty"></block>
      <block type="lists_indexOf">
        <value name="VALUE">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.listVariable" desc="IBID"}list{/msg}</title>
          </block>
        </value>
      </block>
      <block type="lists_getIndex">
        <value name="VALUE">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.listVariable" desc="IBID"}list{/msg}</title>
          </block>
        </value>
      </block>
      <block type="lists_setIndex">
        <value name="LIST">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.listVariable" desc="IBID"}list{/msg}</title>
          </block>
        </value>
      </block>
      <block type="lists_getSublist">
        <value name="LIST">
          <block type="variables_get">
            <title name="VAR">{msg meaning="Apps.listVariable" desc="IBID"}list{/msg}</title>
          </block>
        </value>
      </block>
    </category>
    <category name="{msg meaning="Apps.catColour" desc="IBID"}Colour{/msg}">
      <block type="colour_picker"></block>
      <block type="colour_random"></block>
      <block type="colour_rgb"></block>
      <block type="colour_blend"></block>
    </category>
    <category name="{msg meaning="Apps.catVariables" desc="IBID"}Variables{/msg}" custom="VARIABLE"></category>
    <category name="{msg meaning="Apps.catProcedures" desc="IBID"}Procedures{/msg}" custom="PROCEDURE"></category>
  </xml>
{/template}

/**
 * Readonly Blockly in an iframe.
 */
{template .readonly}
  {call .messages /}

  <script type="text/javascript" src="../../blockly_compressed.js"></script>
  <script type="text/javascript" src="../../{$ij.langSrc}"></script>
  <div id="blockly"></div>
{/template}
